package com.gitee.wsl.struct.event

interface EventManager{
     val eventHandler: EventsHandler
         get() = EventsHandlerImp()
}

inline fun <reified EventType : Event> EventManager.registerEvent(lambda: EventAction<EventType>)  {
    eventHandler.register(lambda)
}

inline fun <reified EventType : Event> EventManager.fireEvent(event: EventType) {
    eventHandler.fireEvent(event)
}